package com.ark.service.mapper;

import com.ark.common.domain.entity.sys.SysUser;
import com.github.yulichang.base.MPJBaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SysUserMapper extends MPJBaseMapper<SysUser> {

    /**
     * 逻辑删除用户
     * @param userIds
     * @return
     */
    int deleteUserByIds(Long[] userIds);

    /**
     * 根据用户名查询用户信息
     * @param username 用户名
     */
    SysUser selectUserByUsername(String username);

    /**
     * 插入角色
     * @param userId 用户id
     * @param roleId 角色id
     */
    int insertUserIdRoleId(@Param("userId") Long userId,@Param("roleId") Long roleId);
}
